package com.morpheus.zookeeper.api.lock;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;

public interface MultiLock {
	public void lock(String lockName);

	public void lock(String lockName, long time, TimeUnit unit) throws InterruptedException;

	public void lockInterruptibly(String lockName) throws InterruptedException;

	public Condition newCondition(String lockName);

	public boolean tryLock(String lockName);

	public boolean tryLock(String lockName, long time, TimeUnit unit) throws InterruptedException;

	public void unlock(String lockName);

	public void destory(String lockName);
}
